{% extends "web/base.html" %}
{% block title %}Transaction List{% endblock %}
{% block content %}
    <h1>Transaction List for account {{account.name}}</h1>
    <table>
    	{% for account in accounts %}
	<tr><td><a href="/accountShow?account={{account.key.urlsafe()}}">{{account.name}}</a></td><td>{{account.description}}</td><td>{{account.getCategoryName()}}</td></tr>
    	{% endfor %}
    </table>
    <form action="/transactionCreate" method="post">
	<input type="hidden" name="account" value="{{account.key.urlsafe()}}" />
	Name: <input type="text" name="name" /> <br/>
	Description: <input type="text" name="description" /> <br/>
	Category: <select name="categoryKey">
	{% for categoryKey in categories.keys() %}
	<option value="{{categoryKey}}">{{categories[categoryKey]}}</option>
	{% endfor %}
	</select> <br/>
	<input type="submit" value="Save" />
    </form>
{% endblock %}
